package com.acquisition.param.dto;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 单独串口参数
 * 对应SingleSerialPortParam
 *
 * @author wuqiwei
 * @date 2020/10/15
 */
public class SingleSerialPortConfig {

	@JSONField(name="serialPort")
	private String serialPort;

	@JSONField(name="portName")
	private String portName;

	@JSONField(name="baudRate")
	private int baudRate;

	@JSONField(name="dataBits")
	private int dataBits;

	@JSONField(name="checkBit")
	private String checkBit;

	@JSONField(name="stopBit")
	private int stopBit;

	public SingleSerialPortConfig() {
		super();
	}

	public SingleSerialPortConfig(String serialPort, String portName, int baudRate, int dataBits, String checkBit,
								  int stopBit) {
		super();
		this.serialPort = serialPort;
		this.portName = portName;
		this.baudRate = baudRate;
		this.dataBits = dataBits;
		this.checkBit = checkBit;
		this.stopBit = stopBit;
	}

	public String getSerialPort() {
		return serialPort;
	}

	public void setSerialPort(String serialPort) {
		this.serialPort = serialPort;
	}

	public String getPortName() {
		return portName;
	}

	public void setPortName(String portName) {
		this.portName = portName;
	}

	public int getBaudRate() {
		return baudRate;
	}

	public void setBaudRate(int baudRate) {
		this.baudRate = baudRate;
	}

	public int getDataBits() {
		return dataBits;
	}

	public void setDataBits(int dataBits) {
		this.dataBits = dataBits;
	}

	public String getCheckBit() {
		return checkBit;
	}

	public void setCheckBit(String checkBit) {
		this.checkBit = checkBit;
	}

	public int getStopBit() {
		return stopBit;
	}

	public void setStopBit(int stopBit) {
		this.stopBit = stopBit;
	}

	@Override
	public String toString() {
		return "SingleSerialPortConfig [serialPort=" + serialPort + ", portName=" + portName + ", baudRate=" + baudRate
				+ ", dataBits=" + dataBits + ", checkBit=" + checkBit + ", stopBit=" + stopBit + "]";
	}

}
